import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/apps/www/Layout/Layout.vue'
Vue.use(VueRouter)
const constantRouterMap = [
  {
    path: '/',
    meta: {},
    component: Layout,
    children: [
      {
        path: '',
        name: 'Index',
        meta: {},
        components: {
          default: () => import('@/apps/www/views/Index.vue')
        }
      }
    ]
  }
]
var routerInstance = new VueRouter({
  routes: constantRouterMap,
  scrollBehavior (to, from, savedPosition) {
    // return 期望滚动到哪个的位置
    return { x: 0, y: 0 }
  }
})
export default routerInstance
